Skip to content

Document Windows stdio command-shell parsing - #1760

Closed
andyst-dev wants to merge 1 commit into
modelcontextprotocol:mainfrom
andyst-dev:docs/windows-stdio-shell-security
Closed

Document Windows stdio command-shell parsing#1760
andyst-dev wants to merge 1 commit into
modelcontextprotocol:mainfrom
andyst-dev:docs/windows-stdio-shell-security

Conversation

@andyst-dev

Copy link
Copy Markdown

Summary

  • document on the public Command and Arguments API that Windows stdio launches are routed through cmd.exe /c
  • clarify that list-shaped arguments are still interpreted by the Windows command shell
  • add a security warning to the stdio transport guide describing the SDK's limited escaping and recommending validation or allowlisting

Motivation

Callers can otherwise reasonably assume that Arguments reaches the child as an argv vector without shell interpretation. On Windows, that assumption is false for commands other than cmd.exe, which can invalidate command-injection threat models.

Fixes #1751.

Validation

  • dotnet build — 0 warnings, 0 errors
  • make generate-docs — DocFX completed with --warningsAsErrors true, 0 warnings, 0 errors
  • git diff --check

@andyst-dev
andyst-dev force-pushed the docs/windows-stdio-shell-security branch from 4d44bed to 404aa98 Compare August 6, 2026 06:35
@andyst-dev

Copy link
Copy Markdown
Author

Closing as abandoned: this PR has had no maintainer review for over a month in an otherwise active repo, and the maintainers have not engaged with it. The work remains available in the fork branch if the team ever wants it (reopen anytime).

@andyst-dev andyst-dev closed this Sep 4, 2026
@andyst-dev
andyst-dev deleted the docs/windows-stdio-shell-security branch September 4, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document the Windows cmd.exe /c interposition as a security-relevant property, not just a quoting bug

3 participants